import request from '@/utils/request'

export default {
    //1.专辑图片列表，带条件查询和分页的
    getAlbumListPage(current, limit, albumPicQuery) {
        return request({
            url: `api/admin/albumpic/${current}/${limit}/pic`,
            method: 'post',
            data: albumPicQuery
        })
    },
    //2.删除图片
    deleteAlbumById(id) {
        return request({
            url: `api/admin/albumpic/${id}`,
            method: 'delete'
        })
    },
    //3.修改专辑上线状态
    modifiyOnline(id, state) {
        return request({
            url: `api/admin/albumpic/online/${id}/${state}`,
            method: 'get'
        })

    },
    //4.获得专辑信息
    getAlbum(){
        return request({
            url: `api/admin/album/all`,
            method: 'get'
        })
    },
    //5.上传专辑照片
    addPic(albumPics){
        return request({
            url: `api/admin/albumpic/albumpic`,
            method: 'post',
            data:albumPics
        })
    }
}